<div id="information">
<br /><br />
<?php
if($_GET['mode']=='edit'){
   $upd_f = mysql_query('UPDATE tutorials SET locked = 0 WHERE id='.$_GET['id'].'');
}
$select_cat = mysql_query('SELECT * FROM tutorials WHERE locked = 1');
if(mysql_num_rows($select_cat) == 0){
   echo '<p class="error">Няма заключени самоучители</p>';
} else {
echo '
<table border="0" style="border-collapse: collapse; margin-left: 20px; width: 650px; text-shadow: 1px 1px 1px #fff;">
<tr style="background-color: #b7b6b6;"><td align="center"><p><b>Име на категорията</b></p></td><td align="center"><p><b>Опции</b></p></td></tr>
';
while($row_m = mysql_fetch_assoc($select_cat)){
   	echo '<tr><td></td></tr>';
	echo '<tr><td></td></tr>';
	echo '<tr><td></td></tr>';
    echo '<tr style="height: 40px; background-color: #ede7e7; text-shadow: 3px 3px 3px #fff;"><td style="padding-left: 10px;"><b>'.$row_m['name'].'</b></td>
	<td style="padding-right: 10px; text-align: center;">
	<a href="lockedtutorial.php?id='.$row_m['id'].'&amp;mode=edit"><img src="../img/check.png" width="20" height="20" alt="see"/></a>
	<a href="editnews.php?id='.$row_m['id'].'&amp;mode=delete"><img src="../img/delete.png" alt="delete"/></a></td></tr>
	<tr><td colspan="4" style="padding-left: 10px; padding-right: 10px;"><hr /></td></tr>';
}
echo '</table>';
}
?>
</div>